﻿@model StuSherwin.Mvc.Models.Admin.CreatePost

@{
    ViewBag.Title = "Create post";
    Layout = "~/Views/Admin/_Layout.cshtml";
}

<h2>Edit</h2>

@using (Html.BeginForm())
{
    @Html.LabelFor(m => m.CategoryId)
    @Html.DropDownListFor(m => m.CategoryId, Model.Categories)
    
    @Html.LabelFor(m => m.Title)
    @Html.EditorFor(m => m.Title)

    @Html.LabelFor(m => m.Code)
    @Html.EditorFor(m => m.Code)

    @Html.LabelFor(m => m.Body)
    @Html.EditorFor(m => m.Body)

    <input type="submit" value="Save" class="button" />
}